# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Zanny <lordzanny@gmail.com>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=clinfo
pkgver=3.0.21.02.21
pkgrel=1
pkgdesc="Simple OpenCL application that enumerates all available platform and device properties"
arch=(loong64 x86_64)
url="https://github.com/Oblomov/clinfo"
license=('custom:Public Domain')
depends=(opencl-icd-loader)
makedepends=(opencl-headers)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('e52f5c374a10364999d57a1be30219b47fb0b4f090e418f2ca19a0c037c1e694')

build() {
  cd ${pkgname}-${pkgver}
  make
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm755 clinfo -t "${pkgdir}"/usr/bin/
  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
  install -Dm644 man1/clinfo.1 -t "${pkgdir}"/usr/share/man/man1/
}
